// namespace audio {
	
// 	let bgm: egret.Sound;
// 	let bgmComplete: boolean = false;
// 	let bgmCtrl: egret.SoundChannel;
// 	const RES = 'resource/sounds/';
// 	let list = [];

// 	export function play(name: string) {
// 		if (list[name] && list[name].complete) {
// 			(list[name].sound as egret.Sound).play(0, 1);
// 		}
// 	}

// 	export function preload(): void {
// 		let names = [SOUND.CRUSH, SOUND.GOLD, SOUND.HURT, SOUND.JUMP, SOUND.PROTECT, SOUND.SHIELD, SOUND.SUPER, SOUND.TIMES, SOUND.FALL];
// 		names.forEach(name => {
// 			let sound = new egret.Sound();
// 			list[name] = { name: name + '.mp3', complete: false, sound };
// 			sound.addEventListener(egret.Event.COMPLETE, () => list[name].complete = true, this);
// 			sound.load(RES + name + '.mp3');
// 		});
// 		bgm = new egret.Sound();
// 		bgm.addEventListener(egret.Event.COMPLETE, () => bgmComplete = true, this);
// 		bgm.load("resource/sounds/bgm.mp3");
// 	}

// 	export function resumeBg(): void {
// 		if (bgm) bgmCtrl = bgm.play(0, -1);
// 		else playBg();
// 	}

// 	export function playBg(): void {
// 		if (bgmComplete) bgmCtrl = bgm.play(0, -1);
// 		else {
// 			bgm.addEventListener(egret.Event.COMPLETE, () => { bgmComplete = true; bgmCtrl = bgm.play(0, -1) }, this);
// 			bgm.load("resource/sounds/bgm.mp3");
// 		}
// 	}

// 	export function stopBg(): void {
// 		if (bgmCtrl) bgmCtrl.stop();
// 	}
// }